/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmPayrequest extends BasicModel<PmPayrequest> {
  djno?: string; // 单据编号
  projectno?: string; // 项目编号
  projectname?: string; // 项目名称
  payType?: string; // 款项类型
  imoney?: number; // 申请金额
  createByName?: string; // 申请人
  realMoney?: number; // 实际金额
}

export const pmPayrequestList = (params?: PmPayrequest | any) =>
  defHttp.get<PmPayrequest>({ url: adminPath + '/pay/pmPayrequest/list', params });

export const pmPayrequestListData = (params?: PmPayrequest | any) =>
  defHttp.post<Page<PmPayrequest>>({ url: adminPath + '/pay/pmPayrequest/listData', params });

export const pmPayrequestForm = (params?: PmPayrequest | any) =>
  defHttp.get<PmPayrequest>({ url: adminPath + '/pay/pmPayrequest/form', params });

export const pmPayrequestSave = (params?: any, data?: PmPayrequest | any) =>
  defHttp.postJson<PmPayrequest>({ url: adminPath + '/pay/pmPayrequest/save', params, data });

export const pmPayrequestDelete = (params?: PmPayrequest | any) =>
  defHttp.get<PmPayrequest>({ url: adminPath + '/pay/pmPayrequest/delete', params });


export const pmPayrequestaccountSave = (params?: any, data?: PmPayrequest | any) =>
  defHttp.postJson<PmPayrequest>({ url: adminPath + '/pay/pmPayrequest/accountSave', params, data });

export const pmPayrequestresultSave = (params?: any, data?: PmPayrequest | any) =>
  defHttp.postJson<PmPayrequest>({ url: adminPath + '/pay/pmPayrequest/resultSave', params, data });